package cn.tedu.boot24.mapper;

import cn.tedu.boot24.entity.User;
import org.apache.ibatis.annotations.*;

/**
 * @author wxd
 * @version 1.0
 */
@Mapper
public interface UserMapper {
    @Insert("insert into user values(null,#{username},#{password},#{nick})")
    void insert(User user);

    @Delete("delect from user where name=#{name}")
    void deleteByName(String name);

    @Update("update user set username=#{username},password=#{password},nick=#{nick} where id=#{id}")
    void updateByID(User user);

    @Select("select * from user where username=#{username}")
    User selectByUsername(String username);

}
